<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/views1/DTD/views1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">
	<ui:composition template="/views/layout/main.xhtml">
		<ui:define name="conteudo">
			<h:form id="formPrincipal">
				<div class="grid_18 div_48">
					<p:commandButton ajax="false" widgetVar="btn_Salvar" styleClass="save" 
						action="#{alunoBean.atualizar}" title="Salvar" />
					<p:commandButton immediate="true" widgetVar="btn_Desistir" ajax="false" styleClass="cancel"
						action="#{alunoBean.desistirUpdate}" title="Desistir" />
				</div>
				
				<div class="grid_18 titulo">Alunos</div>
				
				<div class="grid_18"><p:messages id="mensages"/></div>
				
				<div class="grid_4 label">Nome Completo:</div>
				<div class="grid_14 campo">
					<p:inputText id="aluno_nomeCompleto"
								styleClass="input-gg"  
								widgetVar="aluno_nomeCompleto"
								required="true"
								requiredMessage="Campo 'Nome Completo' é obrigatório"
								validator="#{alunoBean.validateNomeCompleto}" 
								value="#{alunoBean.alunoInstance.nomeCompleto}"/>
				</div>
				
				<div class="grid_4 label">Email:</div>
				<div class="grid_14 campo">
					<p:inputText id="aluno_email" 
								styleClass="input-gg" 
								widgetVar="aluno_email"
								required="true"
								requiredMessage="Campo 'Email' é obrigatório" 
								validator="#{alunoBean.validateEmail}"
								value="#{alunoBean.alunoInstance.email}"/>
				</div>
				
			<!-- INCLUSAO DE TEMPLATES -->
			<ui:include src="/views/alunos/dialogs/dialogSalvar.xhtml"/>
			</h:form>
			
			
		</ui:define>
	</ui:composition>
</f:view>